package main
import (
	"fmt"
	"strconv"
	"time"
)

func main() {
	intChan := make(chan int,10)
	stringChan := make(chan string,10)
	for i:=1;i<=10;i++{
		intChan <- i
	}
	for i:=1;i<=10;i++{
		stringChan <- "helloworld " + strconv.FormatInt(int64(i),2)
	}
	for {
		select {
		case v := <-intChan :
			fmt.Printf("intChan里面的%d \n",v)
		case v := <-stringChan :
			fmt.Printf("intChan里面的%s \n",v)
		default:
			fmt.Println("结束")
			return
		}
		time.Sleep(time.Millisecond * 9)
	}
}